Explanation of the differences between a href = # And a href = javascript: void (0)
A href = "#"> after clicking the link, the page will be rolled up to the TOP, # The default anchor is # TOP
after you click the link, the page does not move and
If you do not set the href property below IE6, you will not respond to hover. Double-clicking will select the label's parent container instead of the one-a label (this problem exists under IE).
The code is as follows
Copy Code
Javascript: What does void (0) mean and the difference between href = # And href = javascriptvoid (0,
In Javascript, void is an operator that specifies to calculate an expression but does not return a value.
The format of the void operator is as
Original: href and onclick usages, distinctions, precedence levels in Html a tagsIf you do not set the href attribute under IE6, hover will not respond. When you double-click the label's parent container is selected instead of the one-a-label (the
[JavaScript] obtain the URL of the current page and window. location. href, window. location. href
Using Javascript to get the URL of the current page seems complicated. If you think about the problem for the first time, many people may wonder which
Reprint: http://blog.csdn.net/u010552788/article/details/49385487Javascript:void (0) means to do nothing! He is not a page URL, but a JavaScript statement void (0), Void is an operator that specifies to evaluate an expression but does not return a
The difference between the JavaScript in the onclick is generally useless to pay no attention to, but the error is somewhat depressed, read this chapter explains the following:Had always been very casual, later see. NET LinkButton seems to be used
Location. href user summary, location. href Summary
*. Location. href usage:Top. location. href = "url" opens the url on the top-level page (jump out of the Framework)Self. location. href = "url" only opens the url address on this pageParent.
A href= "#" > click on the link, the page will scroll up to the top of the page, # The default anchor point is #TOP
click the link after the page does not move, just open the link
function ditto, different browsers will have differences.
Click
Scenario: in some environments, we need to determine the parameters of a (some) hyperlink based on the values of JavaScript variables on the page, such as"Http://www.bla.com/test.aspx? Var1 ="To determine how much var1 is equal to, it must be
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.